/**
 * @Author: lll
 * @Email:li.lele@vpclub.cn
 * @Date: create in 2020/6/28
 */
package cn.vpclub.admin.util;

import cn.vpclub.admin.exception.NoPermissionException;

public enum ResponseCodeEnum {
    SUCCESS(200, "成功！"),
    UserExit(201, "用户名被占用！"),
    UserNotExit(202, "账号或密码错误！"),
    PasswordNotEqual(207, "两次密码不相同！"),
    CodeWrong(208, "验证码错误！"),
    NoToken(203, "请获取token！"),
    TokenWrong(204, "token错误，请重新获取token！"),
    IllegalArgumentException(205, "token被修改了，请重新获取token！"),
    TokenExpiredException(206, "token到期，请重新获取token！"),
    HasStared(209, "已经点赞，请勿重复操作！"),
    NOUSER(210, "没有改用户"),
    FAIL(500, "失败！"),
    NOTFOUND(404, "资源请求路径错误！"),
    METHODERROR(600, "请求方式错误！"),
    NoPermission(444, "无权限!"),
    METHODPARAMSERROR(100, "方法参数错误！");

    ResponseCodeEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    private Integer code;

    private String message;

    public void setCode(Integer code) {
        this.code = code;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
